# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libgusb
pkgver=0.3.4
pkgrel=1
pkgdesc="GLib wrapper around libusb"
url="https://github.com/hughsie/libgusb"
arch="all"
license="LGPL-2.1-or-later"
# disabled due to: gusb-self-test FAIL
options="!check"
makedepends="glib-dev libusb-dev gtk-doc vala eudev-dev gobject-introspection-dev meson"
checkdepends="python3-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="libgusb-$pkgver.tar.gz::https://github.com/hughsie/libgusb/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	mkdir -p output
}

build() {
	meson . ./output --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--buildtype=plain
	ninja -C output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="7254751a06ace17157bb5a6a8d5c859d5c4139c02a8d44973de126c716b34e57bf7a3a33f480ca83f0ec03206ac7e68f47104017cd5be6112a8b13c8abae53b3  libgusb-0.3.4.tar.gz"
